package com.atguigu.userservice.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author alan
 */
@Component
public class WxConstUtils implements InitializingBean {

    @Value("${wx.open.app_id}")
    private String appId;
    @Value("${wx.open.redirect_url}")
    private String redirectUri;
    @Value("${wx.open.app_secret}")
    private String appSecret;

    public static String APP_ID;
    public static String REDIRECT_URI;
    public static String APP_SECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        APP_ID = appId;
        REDIRECT_URI = redirectUri;
        APP_SECRET = appSecret;
    }
}
